﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Bridge.UI
{
    /// <summary>
    /// Interaction logic for WelcomeWindow.xaml
    /// </summary>
    public partial class WelcomeWindow : Window
    {
        public readonly static DependencyProperty ShowOnStartupProperty = DependencyProperty.Register(
            "ShowOnStartup",
            typeof(bool),
            typeof(WelcomeWindow));

        public WelcomeWindow()
        {
            ShowOnStartup = Properties.Settings.Default.ShowWelcomeOnStartup;

            InitializeComponent();
        }

        public bool ShowOnStartup
        {
            get { return (bool)GetValue(ShowOnStartupProperty); }
            set
            {
                SetValue(ShowOnStartupProperty, value);
                Properties.Settings.Default.ShowWelcomeOnStartup = value;
                Properties.Settings.Default.Save();
            }
        }

        private void TopCloseBar_Minimize(object sender, RoutedEventArgs e)
        {
            WindowState = WindowState.Minimized;
        }

        private void TopCloseBar_Maximize(object sender, RoutedEventArgs e)
        {
            WindowState = WindowState.Maximized;
        }

        private void TopCloseBar_Restore(object sender, RoutedEventArgs e)
        {
            WindowState = WindowState.Normal;
        }

        private void TopCloseBar_Close(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void TopCloseBar_Drag(object sender, RoutedEventArgs e)
        {
            DragMove();
        }

        private void buttonOK_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void DLLManagerRun_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Main.ActiveTab = "DLL Manager";
        }

        private void ImportFromStatblockRun_MouseDown(object sender, MouseButtonEventArgs e)
        {

        }
    }
}
